home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01a.txt / 000068_icon-group-sender _Tue Jun 27 12:51:19 2000.msg < prev    next >
Internet Message Format  |  2002-01-03  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id MAA14139
  4.     for icon-group-addresses; Tue, 27 Jun 2000 12:51:11 -0700 (MST)
  5. Message-Id: <200006271951.MAA14139@baskerville.CS.Arizona.EDU>
  6. Date: Tue, 27 Jun 2000 14:21:56 -0400
  7. From: "Steve Graham" <Steve_Graham@labcorp.com>
  8. To: <icon-group@optima.CS.Arizona.EDU>
  9. Subject: Re: Permutations/Combinations
  10. Content-Disposition: inline
  11. X-MIME-Autoconverted: from quoted-printable to 8bit by baskerville.CS.Arizona.EDU id LAA11829
  12. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  13. Status: RO
  14. Content-Length: 1779
  15.  
  16. You're right, Gregg, you did avoid the reversible assignment topic.  
  17.  
  18. Although I do not know how to utilize Icon's built-in features to generate all possible combinations/permutations (which one is it?) where the letters appear once and only once, I do believe that, given the generated list, I will recognize the valid words.  And I'm sure that Icon can EASILY produce the list, whether the algorthim utilizes reversible assignment or not.  Can someone show me how?
  19.  
  20. TIA,
  21.  
  22. Steve
  23.  
  24. ===
  25.  
  26. ---------------------------------------------------------------------------------------
  27. Steve Graham
  28. Senior Programmer/Analyst
  29. LabCorp
  30.  
  31. Phone: (972) 437-5255, ext 5224
  32. Fax:     (972) 454-1040
  33. Mail:    grahams@labcorp.com
  34. ---------------------------------------------------------------------------------------
  35.  
  36.  
  37. >>> Gregg Townsend <gmt@baskerville.CS.Arizona.EDU> 06/27/00 12:31PM >>>
  38.     From: "Steve Graham" <Steve_Graham@labcorp.com>
  39.     
  40.     We have a brain teaser floating around work whose object is to find all
  41.     6-letter English words which can be made from the letters A, E, R, B,M
  42.     and L.  I'm sure you can do this with Icon's reversible assignment,
  43.     but I don't understand the latter.  Can anyone help me?
  44.  
  45. If you have a list of English words, an easy solution to the brain teaser
  46. is to run the list through this filter:
  47.  
  48.     procedure main()
  49.        local word
  50.        while word := read() do
  51.           if *word = 6 & cset(map(word)) == 'aerbml' then
  52.          write(word)
  53.     end
  54.  
  55. Of course, I have managed to avoid entirely your question about
  56. reversible assignment.
  57.     
  58.    ---------------------------------------------------------------------------
  59.    Gregg Townsend         Staff Scientist      The University of Arizona
  60.    gmt@cs.arizona.edu     Computer Science     Tucson, Arizona, USA
  61.  
  62.  
  63.